<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>tab选项卡</title>
		<script src="XiaoMi/js/jquery-1.11.1.js"></script>
		<style>
			.tab_box{
				height: 50px;
			}
			.tab_box div{
				width: 100px;
				height: 50px;
				margin-right: 10px;
				float: left;
				background-color: #55aa7f;
				text-align: center;
				line-height: 50px;
				cursor: pointer;
			}
			#text{
				width: 800px;
				height: 500px;
				background-color: aqua;
				line-height: 500px;
				text-align: center;
				line-height: 500px;
			}
		</style>
	</head>
	<body>
		
		<div class="tab_box">
			<div class="tab_01">tab1</div>
			<div class="tab_02">tab2</div>
			<div class="tab_03">tab3</div>
		</div>
		<div id="text">请选择</div>
		<script>
			$(".tab_01").click(function(){
				$(".tab_01").css("background-color","aqua");
				$(".tab_02").css("background-color","#55aa7f");
				$(".tab_03").css("background-color","#55aa7f");
				$("#text").html("<div>tab文字内容1</div>");
			});
			
			$(".tab_02").click(function(){
				$(".tab_01").css("background-color","#55aa7f");
				$(".tab_02").css("background-color","aqua");
				$(".tab_03").css("background-color","#55aa7f");
				$("#text").html("<div>tab文字内容2</div>");
			});
			
			$(".tab_03").click(function(){
				$(".tab_01").css("background-color","#55aa7f");
				$(".tab_02").css("background-color","#55aa7f");
				$(".tab_03").css("background-color","aqua");
				$("#text").html("<div>tab文字内容3</div>");
			});
		</script>
	</body>
</html>